//
//  JPData.h
//  ihas
//
//  Created by Jpwang on 17/2/14.
//  Copyright © 2017年 Jpwang. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface NSData (Base64)

+ (id)dataWithBase64EncodedString:(NSString *)string;
- (NSString *)base64Encoding;

@end


#import <CommonCrypto/CommonCryptor.h>
#import <CommonCrypto/CommonKeyDerivation.h>
@interface NSData (AES256)

+ (NSString *)AES256EncryptWithPlainText:(NSString *)plain password:(NSString *)password iv:(Byte[])byte;
+ (NSString *)AES256DecryptWithCiphertext:(NSString *)ciphertexts password:(NSString *)password iv:(Byte[])byte;

+ (NSString *)AES256EncryptWithPlainText:(NSString *)plain password:(NSString *)password;
+ (NSString *)AES256DecryptWithCiphertext:(NSString *)ciphertexts password:(NSString *)password;

+ (NSString *)AES256EncryptWithPlainText:(NSString *)plain;        /*加密方法,参数需要加密的内容*/
+ (NSString *)AES256DecryptWithCiphertext:(NSString *)ciphertexts; /*解密方法，参数数密文*/

@end
